Verus: Verifying Rust Programs using Linear Ghost Types
نویسندگان
چکیده
The Rust programming language provides a powerful type system that checks linearity and borrowing, allowing code to safely manipulate memory without garbage collection making ideal for developing low-level, high-assurance systems. For such systems, formal verification can be useful prove functional correctness properties beyond safety. This paper presents Verus, an SMT-based tool formally verifying programs. With programmers express proofs specifications using the language, take advantage of Rust's linear types borrow checking. We show how this allows linearly typed permissions let memory, pointers, concurrent resources. Verus organizes novel mode distinguishes specifications, which are not checked from executable proofs, borrowing. formalize Verus' linearity, modes in small lambda calculus, we safety termination proofs. demonstrate on series examples, including pointer-manipulating (an xor-based doubly linked list), with interior mutability, code.
منابع مشابه
Monadic Refinement Types for Verifying JavaScript Programs
Researchers have developed several special-purpose type systems and program logics to analyze JavaScript and other dynamically typed programming languages. Still, no prior system can precisely reason about both higher-order programs and mutable state; each system comes with its own delicate soundness proof (when such proofs are provided at all); and tools based on these theories (when they exis...
متن کاملHMC: Verifying Functional Programs Using Abstract Interpreters
Refinement Types are a promising approach for checking behavioral properties of programs written using advanced language features like higher-order functions, parametric polymorphism and recursive datatypes. The main limitation of refinement type systems to date is the requirement that the programmer provides the types of all functions, after which the type system can check the types and hence,...
متن کاملVerifying Recursive Programs Using Intraprocedural Analyzers
Recursion can complicate program analysis significantly. Some program analyzers simply ignore recursion or even refuse to check recursive programs. In this paper, we propose an algorithm that uses a recursion-free program analyzer as a black box to check recursive programs. With extended program constructs for assumptions, assertions, and nondeterministic values, our algorithm computes function...
متن کاملVerifying Distributed LEGO RCX Programs Using UPPAAL
In this article we show a way to model and verify programs running on LEGO RCX bricks using the tool UPPAAL. We are able to model two RCX units communicating through an infrared channel. To facilitate the distribution of programs on the two RCXes, we develop the “IR Protocol”, which allows both RCXes to read and write variables and I/O ports on the other RCX. The protocol makes use of a simplif...
متن کاملVerifying Data Independent Programs Using Game Semantics
We address the problem of verification of program terms parameterized by a data type X , such that the only operations involving X a program can perform are to input, output, and assign values of type X , as well as to test for equality such values. Such terms are said to be data independent with respect to X . Logical relations for game semantics of terms are defined, and it is shown that the ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
ژورنال
عنوان ژورنال: Proceedings of the ACM on programming languages
سال: 2023
ISSN: ['2475-1421']
DOI: https://doi.org/10.1145/3586037